App({
  globalData: {
    corpId: '',
    hasLogin: false,
    //新增
    authCode: '', //授权码
    accessToken: '',
    userId: '', //用户id
    userName: '', //用户名
    realname: '', //真实用户名
    dingdingId: null, //钉钉id
    departmentId: '', //部门id
    department: '', //部门名称
    identityId: '', //用户角色id
    identity: '', //用户角色名称
    departmentType: '', //部门类型（包括学校，教育局）
    userType: '', //用户类型
    userInfo: '', //
    phone: '',  //手机号
    signInSuccess: '', //
    features: '', //
  },

  // baseUrl : 'http://file.nat300.top/SchoolSecurityService',
  // baseUrl: 'http://localhost:8080/SchoolSecurityService',
  // baseUrl: 'https://4d94-39-170-47-229.jp.ngrok.io/SchoolSecurityService',
  baseUrl : 'https://tidukeji.cn/SchoolSecurityService1',
  // baseUrl : 'http://huxintest.natapp1.cc/SchoolSecurityService',
  // imageUrl: 'https://tidukeji.cn',
  imageUrl: 'https://tidu-hangzhou.oss-cn-hangzhou.aliyuncs.com',
  preUrl: 'https://tidukeji.cn',
  userUrl: "http://localhost:9527/huan/user",
  patrolUrl:"http://localhost:9527/huan/patrol",
  inspectUrl: "http://localhost:9527/huan/inspect",
  backstageUrl: "http://localhost:9527/huan/backstage",
  zhizhouUrl: "http://localhost:9527/huan/zhizhou",
  kaoqinUrl: "http://localhost:9527/huan/kaoqin",
  pushUrl: "http://localhost:9527/huan/push",
  onLaunch(options) {
    console.log('App Launch', options);
    console.log('getSystemInfoSync', dd.getSystemInfoSync());
    console.log('SDKVersion', dd.SDKVersion);
    this.globalData.corpId = options.query.corpId;


    


  },

  onShow() {

  },

  onHide() {
    console.log('App Hide');
  },



  trim(str) {
    let s = str.replace(/^[\r\n]*/g, "");
    s = s.replace(/(^\s*)|(\s*$)/g, "")
    return s;
  },

  trimAll(str) {
    return str.replace(/\s+/g, "");
  }
});
